﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Eventable
{
    /// <summary>
    /// Событие не зарегистрировано
    /// </summary>
    [Serializable]
    public class EventNotRegistredException : Exception
    {
        public string EventName { get; private set; }

        public EventNotRegistredException(string EventName)
            : this(EventName, null) { }

        public EventNotRegistredException(string EventName, Exception inner)
            : base("Событие {0} не зарегистрировано".goFormat(EventName), inner)
        {
            this.EventName = EventName;
        }

        protected EventNotRegistredException(
          SerializationInfo info,
          StreamingContext context)
            : base(info, context) { }
    }
}
